﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ServiceDemo
{
    public class DateHelper
    {
        /// <summary>
        /// 本周
        /// </summary>
        /// <param name="date"></param>
        /// <param name="start"></param>
        /// <param name="end"></param>
        public void GetRangeThisWeek(DateTime date, out DateTime start, out DateTime end)
        {
            DateTime dt = date.Date;
            start = dt.AddDays(-(int)dt.DayOfWeek);
            end = start.AddDays(6);
        }
    }

}
